home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_cyn_cutscene02.cog < prev    next >
Text File  |  1999-11-15  |  36KB  |  1,230 lines

  1. # Jones 3D Cog Script
  2. #
  3. # CYN_Cutscene02.cog
  4. #
  5. # Indy hooks up with Sophia at the campsite. 
  6. #
  7. # [RT & revised by HB]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15.     # ************************ MESSAGES ************************
  16.  
  17.     message        startup
  18.     message        entered
  19.     message        callback
  20.     message        pulse
  21.     message        timer
  22.  
  23.     # ************************ COGS ************************
  24.     cog            fallcog
  25.     cog            sectorcog
  26.     cog            ambcog
  27.     
  28.     # ************************ KEYFRAMES ***********************
  29.  
  30.     keyframe    in_Rub=0in_rubhead_4_4.key                local
  31.     keyframe    in_PushHat=0in_figithat_4_4.key            local
  32.     keyframe    in_ArmsOut=0in_armsout_1_1.key            local
  33.     keyframe    in_armsup=0in_armsup_1_1.key            local
  34.     keyframe    in_lean=0in_leanin20cm_1_1.key            local
  35.     keyframe    in_Think=0in_thinking_4_4.key            local
  36.     keyframe    in_Examine=0in_examgear_1.key            local
  37.     keyframe    in_TurnGear=0in_turngear.key            local
  38.     keyframe    in_Enter=0in_enterheli.key                local
  39.     keyframe    in_leftup=0in_leftarm_1_1.key            local
  40.     keyframe    in_grabVPhoto=0in_pickupphoto_1_13.key    local
  41.     keyframe    in_dropVPhoto=0in_dropphoto_13_4.key    local
  42.     keyframe    in_overThere=0in_overshoulder_4_1.key    local
  43.  
  44.     keyframe    in_Stand2=0in_stand2.key                local
  45.     keyframe    in_Stand4=0in_stand4.key                local
  46.     keyframe    in_Stand5=0in_leanin20cm_1_1.key        local 
  47.     keyframe    in_studyVPhoto=0in_stand13.key            local
  48.     keyframe    in_1to2=0in_stand1_bd_2.key                local
  49.     keyframe    in_1to4=0in_stand1_bd_4.key                local
  50.     keyframe    in_sitheli=0in_sitheli.key                local
  51.  
  52.     keyframe    so_Doff=0so_helmetoff.key                local
  53.     keyframe    so_Hair=0so_hair_2_4.key                local
  54.     keyframe    so_Look=0so_lookshards_1_1.key            local
  55.     keyframe    so_WaveL=0so_waveleft_1_1.key            local
  56.     keyframe    so_WaveR=0so_waveright_1_1.key            local
  57.     keyframe    so_Pouch=0so_pouch_2_2.key                local
  58.     keyframe    so_HeadShake=0so_headshake_1_1.key        local
  59.     keyframe    so_CrossArms=0so_armsmid_3_3.key        local
  60.  
  61.     keyframe    so_Stand1=0so_stand1.key                local
  62.     keyframe    so_Stand3=0so_stand3.key                local
  63.     keyframe    so_Stand4=0so_stand4.key                local
  64.     keyframe    so_Stand5=0so_stand5.key                local
  65.     keyframe    so_Stand6=0so_stand6.key                local
  66.     keyframe    so_1to2=0so_stand1_bd_2.key                local
  67.     keyframe    so_2to1=0so_stand2_bd_1.key                local
  68.     keyframe    so_leftup=0so_lefthnd_2_2.key            local
  69.     keyframe    so_helmeton=0so_helmeton_2_2.key        local
  70.  
  71.     keyframe    in_arm_Point=0in_photopoint.key            local
  72.     keyframe    so_arm_Toss=0so_throwphoto.key            local
  73.  
  74.     keyframe    chopTurn=cyn_chopr.key                    local
  75.     keyframe    chopTurn2=cyn_chopr2.key                local
  76.     keyframe    chopFly=cyn_chopr_fly.key                local
  77.  
  78.     # ************************* MODELS *************************
  79.  
  80.     model        mod_in_Hair=head_in_goodhair.3do        local
  81.     model        mod_in_HandHat=hand_in_hat.3do             local
  82.     model        mod_in_HandPhoto=hand_in_vophoto.3do    local
  83.     model        mod_in_HandGear=hand_in_gear.3do        local
  84.  
  85.     model        mod_so_Helmet=head_so_helmet.3do        local
  86.     model        mod_so_HandHelmet=hand_so_helmet.3do    local
  87.     model        mod_so_HandPhoto=hand_so_photo.3do        local
  88.     model        mod_so_HandShard=hand_so_shard.3do        local
  89.     model        mod_so_HandGear=hand_so_gear.3do        local
  90.  
  91.     model        mod_arm_PhotoBab=photo_so_bab.3do        local
  92.     model        mod_arm_PhotoVo=photo_so_vo1.3do        local
  93.     model        mod_arm_PhotoV2=photo_so_vo2.3do        local
  94.  
  95. #    model        mod_copter=cyn_chopr.3do                local
  96.     model        chop_blad=cyn_chopr_blade.3do            local
  97.     model        chop_rot=cyn_chopr_rotor.3do            local
  98.  
  99.     # ************************* SOUNDS *************************
  100.  
  101.     sound        in00=cn02j00.wav                        local
  102.     sound        in01=cn02j01.wav                        local
  103.     sound        in02=Cn02j03.wav                        local
  104.     sound        in03=Cn02j05.wav                        local
  105.     sound        in04=Cn02j05a.wav                        local
  106.     sound        in05=Cn02j07.wav                        local
  107.     sound        in06=Cn02j09.wav                        local
  108.     sound        in07=Cn02j11.wav                        local
  109.     sound        in08=Cn02j15.wav                        local
  110.     sound        in09=Cn02j17.wav                        local
  111.     sound        in10=Cn02j21.wav                        local
  112.     sound        in11=Cn02j23.wav                        local
  113.     sound        in12=Cn02j25.wav                        local
  114.     sound        in13=Cn02j27.wav                        local
  115.     sound        in14=Cn02j29.wav                        local
  116.     sound        in15=Cn02j32.wav                        local
  117.     sound        in16=Cn02j34.wav                        local
  118.  
  119.     sound        so01=Cn02s02.wav                        local
  120.     sound        so02=Cn02s04.wav                        local
  121.     sound        so03=Cn02s06.wav                        local
  122.     sound        so04=Cn02s08.wav                        local
  123.     sound        so05=Cn02s10.wav                        local
  124.     sound        so06=Cn02s12.wav                        local
  125.     sound        so07=Cn02s13.wav                        local
  126.     sound        so08=Cn02s14.wav                        local
  127.     sound        so09=Cn02s16.wav                        local
  128.     sound        so10=Cn02s18.wav                        local
  129.     sound        so11=Cn02s19.wav                        local
  130.     sound        so12=Cn02s20.wav                        local
  131.     sound        so13=Cn02s22.wav                        local
  132.     sound        so14=Cn02s24.wav                        local
  133.     sound        so15=Cn02s26.wav                        local
  134.     sound        so16=Cn02s28.wav                        local
  135.     sound        so17=Cn02s30.wav                        local
  136.     sound        so18=Cn02s31.wav                        local
  137.     sound        so19=Cn02s33.wav                        local
  138.     sound        so20=Cn02s35a.wav                        local
  139.     sound        so21=Cn02s35b.wav                        local
  140.  
  141.     sound        heliRev1=helicopter_rev1.wav            local
  142.     sound        heliRev2=helicopter_rev2.wav            local
  143.     sound        heliStart1=helicopter_startup.wav        local
  144.     sound        heliStart2=helicopter_startup2.wav        local
  145.  
  146.     sound        pull_part=cyn_metalpart_rattle.wav        local
  147.     sound        spin_part=cyn_metalpart_spin.wav        local
  148.  
  149.     sound        mus_EnterIndy=mus_cyn_cutscene1.wav        local
  150.     sound        mus_VolodPic=mus_cyn_cutscene2.wav        local
  151.     sound        mus_GetPart=mus_gen_machinepart.wav        local
  152.     sound        mus_SpyLine=mus_cyn_cutscene3.wav        local
  153.  
  154.     sound        mus_LiftOff=mus_gen_indycalm.wav        local
  155.  
  156.     # ************************* THINGS *************************
  157.  
  158.     thing        player                                    local
  159.  
  160.     thing        indy                                    linkid=0
  161.     thing        sophia                                    linkid=1
  162.  
  163.     thing        in_arm                                    nolink
  164.     thing        so_arm                                    linkid=2
  165.  
  166.     thing        in_Target1                                nolink
  167.     thing        in_Target2                                nolink
  168.     thing        in_Target3                                nolink
  169.     thing        in_Target4                                nolink
  170. #    no in_Target5
  171.     thing        in_Target6                                nolink
  172.     thing        in_Target7                                nolink
  173.     thing        in_Target8                                nolink
  174.     thing        in_target9                                nolink
  175.  
  176.     thing        so_Target1                                nolink
  177.     thing        so_Target2                                nolink
  178.     thing        so_Target3                                nolink
  179.     thing        so_Target4                                nolink
  180. #    no so_Target5
  181. #    no so_Target6
  182.     thing        so_Target7                              nolink
  183.     thing        so_Target8                                nolink
  184.     thing        so_Target9                                nolink
  185.  
  186.     thing        so_ghost1                                nolink
  187.     thing        so_ghost2                                nolink
  188.  
  189.     thing        indyCam                                    nolink
  190.     thing        indyCam2                                nolink
  191.     thing        indyCam3                                nolink
  192.     thing        indyCam4                                nolink
  193.     thing        indyCam5                                nolink
  194.     thing        indyCam6                                nolink
  195.     thing        indyCam7                                nolink
  196.     thing        indyCam8                                nolink
  197.  
  198.     thing        sophiaCam                                nolink
  199.     thing        sophiaCam2                                nolink
  200.     thing        sophiaCam3                                nolink
  201.     thing        sophiaCam4                                nolink
  202.     thing        sophiaCam5                                nolink
  203.     thing        sophiaCam6                                nolink
  204.     thing        sophiaCam7                                nolink
  205.  
  206. #    thing        sideCam                                    nolink
  207.     thing        sideCam2                                nolink
  208.     thing        sideCam3                                nolink
  209.  
  210.     thing        lowcam                                    nolink
  211.     thing        longCam                                    nolink
  212. #    thing        tableCam                                nolink
  213.     thing        photoCam                                nolink
  214.     thing        heliCam                                    nolink
  215.  
  216.     thing        photoBab                                nolink
  217.     thing        photoVo                                    nolink
  218.     thing        photoV2                                    nolink
  219.  
  220.     thing        camAnchor                                nolink
  221.     thing        copterAnchor                            nolink
  222.  
  223.     thing        table                                    nolink
  224.  
  225.     thing        copter                                    linkid=3
  226.     thing        copt_Target1                            nolink
  227.     thing        copt_Target2                            nolink
  228.     thing        copt_Target3                            nolink
  229.     thing        copt_Target4                            nolink
  230.     thing        copt_Target5                            nolink
  231.  
  232.     thing        in_ghost1                                nolink
  233.     thing        fadeoutplate                            nolink
  234.  
  235.     thing        vulture_1                                nolink
  236.     thing        vulture_2                                nolink
  237.  
  238.     # ******************* WORLD & ENGINE REFS ******************
  239.  
  240.     material    gearMat=rigear.mat                        local
  241.     sector        trigger                                    linkid=4
  242.  
  243.     # ********************** VARIABLES *************************
  244.  
  245.     flex        in_rotRate                                local
  246.     flex        so_rotRate                                local
  247.     flex        cop_rotRate                                local
  248.  
  249.     int            in_track1                                local
  250.     int            in_track2                                local
  251.     int            so_track                                local
  252.     int            cop_track                                local
  253.     int            in_ArmTrack                                local
  254.     int            so_ArmTrack                                local    
  255.     int            part_track                                local
  256.  
  257.     int            in_colltype                                local
  258.     int            so_colltype                                local
  259.     int            co_colltype                                local
  260.  
  261.     int            so_swap=0                                local
  262.     int            so_arm_swap=0                            local
  263.  
  264.     int            sender                                    local
  265.     int            curSound                                local
  266.     int            matAnimNum                                local
  267.     int            bEntered=0                                local
  268.  
  269.     int            curCam                                    local
  270.  
  271.     int            chopSound1                                local
  272.     int            chopSound2                                local
  273.  
  274.     int            callNum                                    local
  275.  
  276.     int            meshRefHat                                local
  277.     int            meshRefHead                                local
  278.     int            meshRefHand                                local
  279.     int            so_meshRefHand                            local
  280.  
  281.     int            spychan                                    local
  282.  
  283.     # *********************** FX STUFF ************************
  284.  
  285.     template    chopdust=chopperdustfx                    local
  286.     template    smokeTpl=+baz_spr_smoke                    local
  287.  
  288.     thing        dust_pivot                                nolink
  289.     thing        smoke                                    local
  290.     thing        chop_shadow                                nolink                            
  291.  
  292.     # ********************* SUBROUTINES ***********************
  293.     
  294.     flex        goggleHead                                local
  295.  
  296. end
  297.  
  298. # ===================================================================
  299.  
  300. code
  301.  
  302. # -------------------------------------------------------------------
  303.  
  304. startup:
  305.  
  306.     # Pointer to Player
  307.     player = GetLocalPlayerThing();
  308.  
  309.     # Prep actors...
  310.     in_rotRate = GetThingMaxRotVel(indy);
  311.     so_rotRate = GetThingMaxRotVel(sophia);
  312.     cop_rotRate = GetThingMaxRotVel(copter);
  313.  
  314.     AISetCutSceneMode(indy);
  315.     AISetCutSceneMode(sophia);
  316.     AISetCutSceneMode(copter);
  317.  
  318.     # Prep set...
  319.     SetThingFlags(chop_shadow, 0x80000);
  320.     SetThingFlags(fadeoutplate, 0x80000);
  321.  
  322.     return;
  323.  
  324. # -------------------------------------------------------------------
  325.  
  326. entered:
  327.  
  328.     if((GetSenderRef() != trigger) || bEntered) return;
  329.  
  330.     bEntered = 1;
  331.  
  332.     Sleep(0.8); # see player finish climbing out of pit
  333.  
  334.     curCam = GetCurrentCamera();
  335.     SetActorFlags(player, 0x200000);
  336.  
  337.     # Stop olv_outside_a01 in the birdambient cog
  338.     SendMessage(ambcog, user0);
  339.  
  340.     StartCutscene(1);
  341.  
  342.     # Play intro music...
  343.     PlaySoundLocal(mus_EnterIndy, 1.0, 0.0, 0x0, 0);
  344.  
  345.     # Make sure we can't see the fadeoutplate...
  346.     SetThingAlpha(fadeoutplate, 0.0);
  347.  
  348.     # Prep...
  349.     ClearThingFlags(copter, 0x80000);
  350.     ClearThingFlags(chop_shadow, 0x80000);
  351.     DestroyThing(vulture_1);
  352.     DestroyThing(vulture_2);
  353.  
  354.     # Disable player...
  355.     ResetThing(player); # right now
  356.     # PlayMode(player, 1, 0); # twice???
  357.     PlayMode(player, 1, 0); # get him into a nice stand
  358.     CopyPlayerHolsters(player, indy);
  359.     SetThingFlags(player, 0x80000);
  360.     AISetCutsceneMode(indy);
  361.     AISetCutsceneMode(sophia);
  362.  
  363.     # Prep Indy & Sophia...
  364.     ClearThingFlags(indy, 0x80000);
  365.     ClearThingFlags(sophia, 0x80000);
  366.  
  367.     # Swap in her goggle head
  368.     call goggleHead;
  369.  
  370.     # Bring Indy into the campsite...
  371.     AISetMoveSpeed(indy, 1.0);
  372.     AISetLookThing(indy, in_Target1);
  373.     AISetMoveThing(indy, in_Target1, 0);
  374.  
  375.     # Cut to shot of Indy entering campsite and enable him...
  376.     SetCameraFocus(2, indyCam);
  377.     SetCameraSecondaryFocus(2, in_ghost1);
  378.     SetCurrentCamera(2);
  379.     SetCameraFOV(70, 0, 0.0);
  380.     Sleep(0.01);
  381.     SetCameraPosInterp(2, 1); # enable dolly
  382.     SetCameraInterpSpeed(2, 3.5); # speed is actually time
  383.     SetCameraFocus(2, lowcam);
  384.     SetCameraFOV(43, 1, 3.5);
  385.     MoveToFrame(in_ghost1, 1, 1.5);
  386.     AIWaitForStop(indy);
  387.     AISetLookThing(indy, sophia);
  388.  
  389.     # Indy:  "Oh no, what now...?"
  390.     Sleep(0.2);
  391.     in_track1 = PlayKey(indy, in_Stand4, 2, 0x0, 0); # indy hands on hips
  392.     PlayKey(indy, in_1to4, 4, 0x12, 0);
  393.     PlayVoice(indy, in00, 1.0, 1);
  394.     Sleep(0.2);
  395.  
  396.     # Move Sophia toward table...
  397.     AISetMoveSpeed(sophia, 1.2);
  398.     AISetLookThing(sophia, so_Target1);
  399.     AISetMoveThing(sophia, so_Target1, 0);
  400.  
  401.     # Long shot of campsite...
  402.     SetCameraPosInterp(2, 0); # disable cam dolly
  403.     SetCameraFocus(2, longCam);
  404.     SetCameraSecondaryFocus(2, so_ghost1); # track the moving ghost
  405.     SetCurrentCamera(2);
  406.     SetCameraFOV(57, 0, 0.0); # was 65, then 60
  407.  
  408.     # Cam and focus moves toward Sophia...
  409.     MoveToFrame(longCam, 1, 1.38); # time to arrive as helmet removal ends (was 1.38)
  410.     SetCameraFOV(22, 1, 6.3); # likewise
  411.     MoveToFrame(so_ghost1, 1, 1.4); # time to arrive with sophia (was 1.5)
  412.  
  413.     # Sophia takes off her hat and goggles, then steps forward...
  414.     AIWaitForStop(sophia);
  415.     AttachThingToThing(so_ghost1, sophia);
  416.     PlayKey(sophia, so_Doff, 4, 0x2, 1);
  417.     AISetMoveSpeed(sophia, 1.0);
  418.     AISetMoveThing(sophia, so_Target2, 1);
  419.  
  420.     # Indy exclaims recognition:  "Sophia?"
  421.     Sleep(0.4);
  422.     curSound = PlayVoice(indy, in01, 1.0, 0);
  423.     Sleep(0.1);
  424.  
  425.     # Cut to Indy...
  426.     SetCameraFocus(0, indyCam2);
  427.     SetCurrentCamera(0);
  428.     SetCameraFOV(47, 0, 0.0);
  429.     AISetLookThing(sophia, indy);
  430.  
  431.     # Swap out Sophia's hand with the helmet while she's offscreen...
  432.     RestoreThingMesh(sophia, -99); # -99 Restores ALL meshes
  433.     DetachThing(so_ghost1);
  434.  
  435.     # Indy pushes his hat back...
  436.     PlayKey(indy, in_PushHat, 4, 0x12, 0);
  437.     WaitForSound(curSound);
  438.     Sleep(0.2);
  439.     
  440.     # Cut to Sophia...
  441.     SetCameraFocus(0, sophiaCam);
  442.     SetCameraFOV(47, 0, 0.0);
  443.     StopKey(indy, in_track1, 0.0);
  444.     AISetLookThing(indy, sophia);
  445.  
  446.     # Sophia: "Hello, Indy..."
  447.     curSound = PlayVoice(sophia, so01, 1.0, 0);
  448.     so_track = PlayKey(sophia, so_Stand4, 2, 0x0, 0);
  449.     PlayKey(sophia, so_Hair, 4, 0x12, 1);
  450.     WaitForSound(curSound);
  451.  
  452.     # Cut to Indy over Sophia's shoulder...
  453.     SetCameraFocus(2, indyCam3);
  454.     SetCameraSecondaryFocus(2, camAnchor);
  455.     SetCurrentCamera(2);
  456.     SetCameraFOV(45, 0, 0.0);
  457.  
  458.     # Indy: "What brings you out west...?"
  459.     curSound = PlayVoice(indy, in02, 1.0, 0);
  460.     StopKey(sophia, so_track, 0.7);
  461.     PlayKey(indy, in_ArmsOut, 4, 0x12, 1);
  462.     PlayKey(indy, in_armsup, 4, 0x12, 0);
  463.     Sleep(1.0); # was 1.5
  464.  
  465.     # Camera follows anchor (and Sophia) toward table...
  466.     MoveToFrame(camAnchor, 1, 1.2);
  467.     SetCameraFOV(30, 1, 1.9); # was 2.0
  468.     AISetMoveSpeed(sophia, 1.1);
  469.     AISetLookThing(sophia, so_Target3);
  470.     Sleep(0.2); ## may need adjusting for foreign language versions
  471.     AISetMoveThing(sophia, so_Target3, 0);
  472.     Sleep(1.0); ## may need adjusting for foreign language versions
  473.     AISetMoveSpeed(sophia, 0.9);
  474.  
  475.     # Sophia arrives and turns toward the table...
  476.     AIWaitForStop(sophia);
  477.     SetThingMaxRotVel(sophia, 50.0);
  478.     AISetLookThing(sophia, table);
  479.  
  480.     # Sophia puts hands on hips...
  481.     so_track = PlayKey(sophia, so_Stand1, 2, 0x0, 0);
  482.     PlayKey(sophia, so_2to1, 4, 0x12, 0);
  483.     Sleep(1.2); # was 1.5
  484.  
  485.     # Teleport Indy while offscreen so he can get to the table...
  486.     TeleportThing(indy, in_Target2);
  487.     WaitForSound(curSound);
  488.  
  489.     # Zero Sophia's head and cut across table...
  490.     SetActorHeadPYR(sophia, '0.0 0.0 0.0');
  491.     SetCameraFocus(0, sophiaCam2);
  492.     SetCurrentCamera(0);
  493.     SetCameraFOV(25, 0, 0.0);
  494.  
  495.     # Aim indyCam3 for next shot...
  496.     MoveToFrame(camAnchor, 2, 2.0);
  497.     PlayKey(sophia, so_Look, 4, 0x12, 0);
  498.  
  499.     # Sophia:  "Wonderful potsherds."
  500.     curSound = PlayVoice(sophia, so02, 1.0, 0);
  501.     Sleep(1.5); ## may need adjusting for foreign language versions
  502.  
  503.     # Indy moves toward the table from offscreen...
  504.     AISetMoveSpeed(indy, 0.9);
  505.     AISetLookThing(indy, sophia);
  506.     AISetMoveThing(indy, in_Target3, 0);
  507.     WaitForSound(curSound);
  508.     Sleep(0.5); ## may need adjusting for foreign language versions (was 1.5)
  509.  
  510.     # Cut back as Indy enters shot...
  511.     SetCameraFocus(2, indyCam3);
  512.     SetCurrentCamera(2);
  513.     SetCameraFOV(35, 0, 0.0);
  514.     AISetLookThing(sophia, indy);
  515.  
  516.     # Indy: "New thinking..."
  517.     curSound = PlayVoice(indy, in03, 1.0, 0);
  518.     AIWaitForStop(indy);
  519.     PlayKey(indy, in_ArmsOut, 4, 0x12, 1);
  520.     PlayKey(indy, in_leftup, 4, 0x12, 0);
  521.     WaitForSound(curSound);
  522.  
  523.     # Cut to closeup of Indy...
  524.     SetCameraFocus(0, indyCam4);
  525.     SetCurrentCamera(0);
  526.     SetCameraFOV(35, 0, 0.0);
  527.     AISetLookThing(sophia, indy);
  528.  
  529.     # Indy: "Kind of noble..."
  530.     Sleep(0.2);
  531.     # PlayKey(indy, in_shrug, 4, 0x12, 0);
  532.     PlayKey(indy, in_armsup, 4, 0x12, 0); # temp until shrug works
  533.     PlayVoice(indy, in04, 1.0, 1);
  534.     Sleep(0.2);
  535.  
  536.     # Cut to shot of Sophia over Indy's shoulder: "Iron curtain..."
  537.     SetCameraFocus(0, sophiaCam3);
  538.     SetCameraFOV(42, 0, 0.0);
  539.     PlayKey(sophia, so_WaveL, 4, 0x12, 0);
  540.     PlayVoice(sophia, so03, 1.0, 1);
  541.  
  542.     # Indy: "I read the papers..."
  543.     in_track1 = PlayKey(indy, in_stand4, 2, 0x0, 0);
  544.     PlayKey(indy, in_1to4, 4, 0x12, 0); # Indy puts hands on hips
  545.     Sleep(0.2);
  546.     PlayVoice(indy, in05, 1.0, 1);
  547.     
  548.     # Sophia: "Wanna really be noble?"
  549.     PlayKey(sophia, so_WaveR, 4, 0x30, 0);
  550.     curSound = PlayVoice(sophia, so04, 1.0, 0);
  551.     Sleep(2.5);
  552.     StopKey(indy, in_track1, 0.5); # relax back to hands at sides
  553.     WaitForSound(curSound);
  554.  
  555.     # Reverse the shot...
  556.     SetCameraFocus(0, indyCam5);
  557.     SetCameraFOV(40, 0, 0.0);
  558.  
  559.     # Indy folds his arms: "Who's we?"
  560.     in_track1 = PlayKey(indy, in_Stand2, 2, 0x0, 0);
  561.     PlayKey(indy, in_1to2, 4, 0x12, 0);
  562.     PlayVoice(indy, in06, 1.0, 1);
  563.  
  564.     # Sophia turns away: "CIA"
  565.     SetThingMaxRotVel(sophia, 280.0);
  566.     StopKey(sophia, so_track, 0.25);
  567.     AISetLookThing(sophia, so_Target4);
  568.     curSound = PlayVoice(sophia, so05, 1.0, 0);
  569.     Sleep(4.5);
  570.     PlayKey(sophia, so_leftup, 4, 0x12, 0);
  571.     WaitForSound(curSound);
  572.  
  573.     # Cut to closeup of Indy...
  574.     StopKey(indy, in_track1, 1.0);
  575.     SetCameraPosInterp(2, 0); # turn off cam dolly
  576.     SetCameraFocus(0, indyCam4);
  577.     SetCurrentCamera(0);
  578.     SetCameraFOV(37, 0, 0.0); # was 35
  579.  
  580.     # Indy: "Atomic secrets?"
  581.     curSound = PlayVoice(indy, in07, 1.0, 0);
  582.     in_track1 = PlayKey(indy, in_Stand4, 2, 0x0, 0); # hands on hips
  583.     PlayKey(indy, in_1to4, 4, 0x12, 1);
  584.     PlayKey(indy, in_Rub, 4, 0x12, 0);
  585.     WaitForSound(curSound);
  586.  
  587.     # Swap in Sophia's hand with photo...
  588.     SetThingMesh(sophia, 15, mod_so_HandPhoto, 0);
  589.  
  590.     # Cut to closeup of Sophia as she turns back toward camera...
  591.     AISetLookThing(sophia, indy);
  592.     SetCameraFocus(0, sophiaCam4);
  593.     SetCameraFOV(25, 0, 0.0);
  594.     StopKey(indy, in_track1, 0); # stop hip stand
  595.     Sleep(0.8); # was 0.9
  596.  
  597.     # Sophia: "Don't be silly..."
  598.     PlayVoice(sophia, so06, 1.0, 1);
  599.  
  600.     # She whips out the photo of Babylon...
  601.     curSound = PlayVoice(sophia, so07, 1.0, 0);
  602.     Sleep(1.1);
  603.     PlayKey(sophia, so_Pouch, 4, 0x12, 0);
  604.     WaitForSound(curSound);
  605.  
  606.     # Cut to table...
  607.     SetCameraFocus(0, photoCam);
  608.     SetCurrentCamera(0);
  609.     SetCameraFOV(32, 0, 0.0);
  610.  
  611.     # Sophia's invisible for a bit...
  612.     SetThingFlags(sophia, 0x10);
  613.  
  614.     # Sophia: "Dig site..."
  615.     curSound = PlayVoice(sophia, so08, 1.0, 0);
  616.  
  617.     # Play Babel theme
  618.     PlaySoundLocal(mus_VolodPic, 1.0, 0.0, 0x0, 0);
  619.  
  620.     # Cheat Indy around to the other side of the table...
  621.     TeleportThing(indy, in_Target1);
  622.     AISetLookThing(indy, in_Target4);
  623.     AISetMoveThing(indy, in_Target4, 0);
  624.  
  625.     # Sophia's arm tosses the photo onto the table...
  626.     ClearThingFlags(so_arm, 0x80000);
  627.     SetThingMesh(so_arm, 5, mod_arm_PhotoBab, 0);
  628.     so_arm_swap = 1; # set callback to drop 1st photo
  629.     so_ArmTrack = PlayKey(so_arm, so_arm_Toss, 2, 0x14, 0); # drop 1st photo
  630.  
  631.     # Indy bends into the shot: "Babylon!"
  632.     AISetLookThing(indy, photoBab);
  633.     Sleep(1.8);
  634.     PlayKey(indy, in_lean, 4, 0x12, 0);
  635.     WaitForSound(curSound);
  636.     Sleep(0.2);
  637.     PlayVoice(indy, in08, 1.0, 1);
  638.  
  639.     # Camera snaps to an even closer shot of the photo...
  640.     Sleep(0.4);
  641.  
  642.     # hide hack on indy's hat brim                CMG 10/3
  643.     SetThingFlags(indy, 0x10);
  644.  
  645.     SetCameraFOV(25, 1, 0.5); # was 1.0
  646.  
  647.     # Sophia: "Remember your bible?"
  648.     curSound = PlayVoice(sophia, so09, 1.0, 0);
  649.  
  650.     # Get rid of Sophia's photo hand...
  651.     RestoreThingMesh(sophia, so_meshRefHand);
  652.  
  653.     # They're lookin' at each other...
  654.     AISetLookThing(indy, sophia); 
  655.     AISetLookThing(sophia, indy);
  656.  
  657.     # Play and hold their "looking down" anims...
  658.     in_track1 = PlayKey(indy, in_Stand5, 4, 0x4, 0);
  659.     in_track2 = PlayKey(indy, in_Stand4, 4, 0x0, 0);
  660.     so_track = PlayKey(sophia, so_Stand5, 4, 0x4, 0);
  661.  
  662.     # Stop the anim on Sophia's arm and hide it...
  663.     StopKey(so_arm, so_ArmTrack, 0.0);
  664.     SetThingFlags(so_arm, 0x80000);
  665.     WaitForSound(curSound);
  666.  
  667.     # Finger points at the photo...
  668.     ClearThingFlags(in_arm, 0x80000);
  669.     in_ArmTrack = PlayKey(in_arm, in_arm_Point, 2, 0x14, 0);
  670.  
  671.     # Indy: "Looks like..."
  672.     PlayVoice(indy, in09, 1.0, 1);
  673.  
  674.     # Stop the anim on Indy's arm and hide it...
  675.     StopKey(in_arm, in_ArmTrack, 0.0);
  676.     SetThingFlags(in_arm, 0x80000);
  677.  
  678.     # close hack on indy's hat brim                CMG 10/3
  679.     ClearThingFlags(indy, 0x10);
  680.  
  681.     # Cut to 2-shot...
  682.     ClearThingFlags(sophia, 0x10); # Sophia is visible
  683.     SetCameraFocus(0, sideCam2);
  684.     #SetCurrentCamera(0);
  685.     SetCameraFOV(30, 0, 0.0);
  686.  
  687.     # ...as they look up at each other...
  688.     StopKey(indy, in_track1, 0.5); # unbend
  689.     StopKey(indy, in_track2, 1.0); # relax out of hands-on-hips pose
  690.     StopKey(sophia, so_track, 0.7);
  691.  
  692.     # Sophia: "Very good, Jones."
  693.     Sleep(0.2);
  694.     PlayVoice(sophia, so10, 1.0, 1);
  695.  
  696.     # Sophia: "Volodnikov..."
  697.     curSound = PlayVoice(sophia, so11, 1.0, 0);
  698.     
  699.     Sleep(0.6);
  700.     AISetLookThing(sophia, so_target8); # she looks down at pix
  701.     Sleep(0.4);
  702.  
  703.     # Cut back to the table...
  704.     SetCameraFocus(0, photoCam);
  705.     SetCameraFOV(32, 0, 0.0);
  706.  
  707.     # Sophia's arm tosses in the photo of Volodya...
  708.     ClearThingFlags(so_arm, 0x80000);
  709.     SetThingMesh(so_arm, 5, mod_arm_PhotoVo, 0);
  710.     so_arm_swap = 2; # set callback to drop 2nd photo
  711.     so_ArmTrack = PlayKey(so_arm, so_arm_Toss, 2, 0x14, 0);
  712.     WaitForSound(curSound);
  713.  
  714.     # Stop the anim on Sophia's arm and hide it...
  715.     StopKey(so_arm, so_ArmTrack, 0.0);
  716.     SetThingFlags(so_arm, 0x80000);
  717.  
  718.     # Sophia: "He thinks there's some truth..."
  719.     curSound = PlayVoice(sophia, so12, 1.0, 0);
  720.     Sleep(0.1);
  721.  
  722.     # Zoom on V photo...
  723.     SetCameraFOV(25, 1, 0.5); # was 1.0
  724.     WaitForSound(curSound);
  725.  
  726.     # Indy: "Godless communist?"
  727.     PlayVoice(indy, in10, 1.0, 1);
  728.  
  729.     # Toss 2nd photo of V...
  730.     ClearThingFlags(so_arm, 0x80000);
  731.     SetThingMesh(so_arm, 5, mod_arm_PhotoV2, 0);
  732.     so_arm_swap = 3; # set callback to drop 3rd photo
  733.     so_ArmTrack = PlayKey(so_arm, so_arm_Toss, 2, 0x14, 0);
  734.  
  735.     # Sophia: "A physicist..."
  736.     PlayVoice(sophia, so13, 1.0, 1);
  737.  
  738.     # Stop anim on Sophia's arm and hide it...
  739.     StopKey(so_arm, so_ArmTrack, 0.0);
  740.     SetThingFlags(so_arm, 0x80000);
  741.  
  742.     # Cut to 2-shot...
  743.     SetCameraFocus(0, sideCam3);
  744.     SetCurrentCamera(0);
  745.     SetCameraFOV(33, 0, 0.0);
  746.  
  747.     # Indy: "What's he doing in Babylon?"
  748.     AISetLookThing(sophia, indy);
  749.     in_track1 = PlayKey(indy, in_studyVPhoto, 2, 0x0, 0);
  750.     PlayKey(indy, in_grabVPhoto, 4, 0x12, 0);
  751.     PlayVoice(indy, in11, 1.0, 1);
  752.  
  753.     # Sophia:  "Atom joke..."
  754.     curSound = PlayVoice(sophia, so14, 1.0, 0);
  755.     Sleep(1.5); ## may need adjusting for foreign language versions
  756.     StopKey(indy, in_track1, 0.0);
  757.     in_track1 = PlayKey(indy, in_Stand4, 2, 0x0, 0);
  758.     PlayKey(indy, in_dropVPhoto, 4, 0x12, 1);
  759.     WaitForSound(curSound);
  760.  
  761.     # Indy: "World's not laughing..."
  762.     PlayVoice(indy, in12, 1.0, 0);
  763.     in_track2 = PlayKey(indy, in_PushHat, 4, 0x12, 0);
  764.     Sleep(2.0); ## may need adjusting for foreign language versions
  765.     StopKey(indy, in_track2, 0.4);
  766.     AISetLookThing(sophia, indy);
  767.  
  768.     # Cut to closeup of Sophia...
  769.     SetThingFlags(indy, 0x10); # make him invisible
  770.     SetCameraFocus(0, sophiaCam5);
  771.     SetCameraFOV(20, 0, 0.0);
  772.  
  773.     # Sophia: "Deadly tower..."
  774.     curSound = PlayVoice(sophia, so15, 1.0, 0);
  775.     so_track = PlayKey(sophia, so_Stand1, 2, 0x0, 0);
  776.     PlayKey(sophia, so_2to1, 4, 0x12, 1);
  777.     PlayKey(sophia, so_WaveL, 4, 0x12, 0);
  778.     WaitForSound(curSound);
  779.  
  780.     # Cut to closeup of Indy: "Tore it down..."
  781.     ClearThingFlags(indy, 0x10); # Indy reappears
  782.     SetThingFlags(sophia, 0x10); # and Sophia is invisible
  783.     SetCameraFocus(0, indyCam6);
  784.     SetCameraFOV(25, 0, 0.0);
  785.     in_track2 = PlayKey(indy, in_Think, 4, 0x12, 0);
  786.     PlayVoice(indy, in13, 1.0, 1);
  787.  
  788.     # Cut to 2-shot...
  789.     ClearThingFlags(sophia, 0x10);
  790.     AISetLookThing(indy, sophia); # was in_target8
  791.     AISetLookThing(sophia, indy);
  792.     SetCameraFocus(0, sideCam3); # was sideCam
  793.     SetCameraFOV(35, 0, 0.0); # was 33
  794.  
  795.     # Sophia: "Exactly."
  796.     PlayVoice(sophia, so16, 1.0, 1);
  797.  
  798.     # Indy: "Amusing theory..."
  799.     StopKey(indy, in_track2, 2.0); # back to hands-on-hips
  800.     curSound = PlayVoice(indy, in14, 1.0, 0);
  801.     Sleep(1.5); ## may need adjusting for foreign language versions
  802.     StopKey(indy, in_track1, 0.0);
  803.     SetThingMaxRotVel(indy, 250.0);
  804.     AISetLookThing(indy, so_target1); # turns away cam right
  805.     PlayKey(indy, in_overThere, 4, 0x12, 0);
  806.     Sleep(1.0);
  807.     AISetLookThing(indy, in_target8); # turns back
  808.     WaitForSound(curSound);
  809.  
  810.     # Sophia: "You don't think...."
  811.     curSound = PlayVoice(sophia, so17, 1.0, 0);
  812.     PlayKey(sophia, so_WaveR, 4, 0x12, 1);
  813.     StopKey(sophia, so_track, 0.0);
  814.     PlayKey(sophia, so_1to2, 4, 0x12, 0);
  815.     Sleep(1.0);
  816.  
  817.     # Sophia: "This came from..."
  818.     SetCameraFocus(0, sophiaCam6);
  819.     SetCameraFOV(20, 0, 0.0);
  820.     SetThingFlags(indy, 0x10); # Indy invisible
  821.     AISetLookThing(indy, sophia);
  822.     
  823.     # part from bag sound effect
  824.     PlaySoundLocal(pull_part, 1.0, 0.0, 0x0, 0);
  825.     
  826.     AISetLookThing(sophia, indy);
  827.     StopKey(indy, in_track1, 0.0); #HB lose hands-on-hips
  828.     so_swap = 1;
  829.     PlayKey(sophia, so_Pouch, 5, 0x12, 0);
  830.     WaitForSound(curSound);
  831.     PlayVoice(sophia, so18, 1.0, 1);
  832.     Sleep(0.5);
  833.  
  834.     # Play theme for the infernal part
  835.     PlaySoundLocal(mus_GetPart, 0.5, 0.0, 0x0, 0);
  836.  
  837.     # Indy takes the gear: 
  838.     SetThingFlags(sophia, 0x10);
  839.     so_track = PlayKey(sophia, so_Stand1, 2, 0x0, 0);
  840.     ClearThingFlags(indy, 0x10); # Indy reappears
  841.     SetCameraFocus(0, indyCam7);
  842.     in_track1 = PlayKey(indy, in_Examine, 4, 0x14, 0);
  843.  
  844.     Sleep(0.5);
  845.  
  846.     PlayVoice(indy, in15, 1.0, 1); # "Somebody made a mistake..."
  847.  
  848.     # Back to Sophia closeup...
  849.     StopKey(indy, in_track1, 0.0);
  850.     SetThingFlags(indy, 0x10); # Indy invisible
  851.     ClearThingFlags(sophia, 0x10); # Sophia reappears
  852.     SetCameraFocus(0, sophiaCam5);
  853.  
  854.     # Sophia: "No mistake..."
  855.     PlayKey(sophia, so_HeadShake, 4, 0x12, 0);
  856.     PlayVoice(sophia, so19, 1.0, 1);
  857.     StopKey(sophia, so_track, 0.0);
  858.  
  859.     # Cut to closeup of Indy's hands...
  860.     SetThingFlags(sophia, 0x10); # Sophia invisible again
  861.     so_track = PlayKey(sophia, so_Stand3, 2, 0x0, 0);
  862.     ClearThingFlags(indy, 0x10); # Indy visible again
  863.     SetCameraFocus(0, indyCam8);
  864.  
  865.     # Indy: "Look at that little wheel spin!"
  866.     # spin the part
  867.     in_track1 = PlayKey(indy, in_TurnGear, 4, 0x14, 0);
  868.     Sleep(0.5);
  869.     part_track=PlaySoundLocal(spin_part, 1.0, 0.0, 0x1, 0);
  870.     PlayVoice(indy, in16, 1.0, 1);
  871.  
  872.     # Wider shot of Sophia over Indy's shoulder...
  873.     StopKey(indy, in_track1, 1.0);
  874.     StopSound(part_track, 1.0);
  875.     ClearThingFlags(sophia, 0x10); # Sophia reappears
  876.     DestroyThing(so_ghost1);
  877.     AttachThingToThing(so_ghost2, sophia);
  878.     SetCameraFocus(2, sophiaCam7);
  879.     SetCameraSecondaryFocus(2, so_ghost2);
  880.     SetCurrentCamera(2);
  881.     SetCameraFOV(50, 0, 0.0);
  882.  
  883.     # run inventory acquisition routine
  884.     ChangeInv(player, 82, 1);
  885.     SetInvAvailable(player, 82, 1);
  886.     JonesInvItemChanged(82);
  887.  
  888.     # Sophia: "C'mon, Indy, we're the CIA..."
  889.     PlayVoice(sophia, so20, 1.0, 0);
  890.     PlayKey(sophia, so_CrossArms, 4, 0x12, 1);
  891.     StopKey(sophia, so_track, 0.8);
  892.  
  893.     # Sophia dons her helmet...
  894.     Sleep(0.8);
  895.     
  896.     # play spy music
  897.     spychan=PlaySoundLocal(mus_SpyLine, 0.5, 0.0, 0x0, 0);
  898.     ChangeSoundVol(spychan, 2, 3.5);
  899.  
  900.  
  901.     so_meshRefHand = SetThingMesh(sophia, 18, mod_so_HandHelmet, 0); # get helmet in hand
  902.     PlayKey(sophia, so_helmeton, 4, 0x12, 1);
  903.  
  904.     # Sophia: "...we've got spies."
  905.     PlayVoice(sophia, so21, 1.0, 0);
  906.     Sleep(0.7); # was 0.4
  907.  
  908.     # Sophia turns and walks out of frame...
  909.     AISetMoveSpeed(sophia, 0.5);
  910.     Sleep(0.3);
  911.     AISetMoveSpeed(sophia, 1.2);
  912.     AISetLookThing(sophia, so_Target9);
  913.     AISetMoveThing(sophia, so_Target9, 1);
  914.  
  915.     # Play helicopter startup sound
  916.     PlaySoundLocal(heliStart1, 1, 0, 0x10, 0);
  917.  
  918.     # Stop the anim on the gear and swap it back out...
  919.     StopAnim(matAnimNum);
  920.     RestoreThingMesh(indy, meshRefHand);
  921.  
  922.     # Cut to helicopter...
  923.     SetCameraFocus(2, heliCam);
  924.     SetCameraSecondaryFocus(2, copterAnchor);
  925.     SetCurrentCamera(2);
  926.     SetCameraFOV(50, 0, 0.0);
  927.  
  928.     # Sophia's already inside...
  929.     TeleportThing(sophia, so_Target7);
  930.     so_track = PlayKey(sophia, so_Stand6, 4, 0x10, 0);
  931.  
  932.     # Start that puppy...
  933.     cop_track = PlayKey(copter, chopTurn, 4, 0x10, 0);
  934.  
  935.     # second sartup sound
  936.     Sleep(3.0);
  937.     PlaySoundLocal(heliStart2, 1, 0, 0x20, 0);
  938.  
  939.     # Kill waterfall noise right now...
  940.     SendMessage(fallcog, user0);
  941.  
  942.     # timers to control the remaining sound fades
  943.     SetTimerEx(2.368, 1, 0, 0);
  944.     SetTimerEx(6.687, 2, 0, 0);
  945.     SetTimerEx(5.790, 3, 0, 0);
  946.     SetTimerEx(7.579, 4, 0, 0);
  947.  
  948.     # light dust
  949.     SetPulse(0.5);
  950.  
  951.     # Indy enters the shot...
  952.     TeleportThing(indy, in_Target6);
  953.     AISetMoveSpeed(indy, 1.1);
  954.     AISetLookThing(indy, in_Target7);
  955.     AISetMoveThing(indy, in_Target7, 1);
  956.  
  957.     # Indy animates into the copter...
  958.     PlayKey(indy, in_Enter, 4, 0x12, 1);
  959.  
  960.     # ...and actually sits there!
  961.     TeleportThing(indy, in_target9);
  962.  
  963.     # Fasten yer seatbelts!
  964.     AttachThingToThingEx(indy, copter, 0x000C);
  965.     PlayKey(indy, in_sitheli, 4, 0x14, 0);
  966.     AttachThingToThingEx(sophia, copter, 0x000C);
  967.     AttachThingToThing(copterAnchor, copter);
  968.  
  969.     # Heads up!
  970.     AISetLookThing(sophia, copt_Target2);
  971.     AISetLookThing(indy, copt_Target2);
  972.  
  973.     # Now rev it up a bit...
  974.     StopKey(copter, cop_track, 0.5);
  975.     SetPulse(0.25);
  976.     cop_track = PlayKey(copter, chopTurn2, 4, 0x10, 0);
  977.     Sleep(0.8);
  978.     StopKey(copter,cop_track, 0.5);
  979.     PlayKey(copter, chopFly, 4, 0x10, 0);
  980.     SetPulse(0.1);
  981.     Sleep(0.3);
  982.  
  983.     # The blades blur...
  984.     SetThingMesh(copter, 3, chop_blad, 0); # main rotor
  985.     SetThingMesh(copter, 1, chop_rot, 0); # tail rotor
  986.     Sleep(1.0);
  987.  
  988.     in_colltype = GetCollideType(indy);
  989.     so_colltype = GetCollideType(sophia);
  990.     co_colltype = GetCollideType(copter);
  991.     SetCollideType(indy, 0);
  992.     SetCollideType(sophia, 0);
  993.     SetCollideType(copter, 0);
  994.  
  995.     # ...and the thing flies away...
  996.     SetThingMaxRotVel(copter, 10.0); # slow to turn
  997.     AISetMoveSpeed(copter, 1.0);
  998.     AISetMoveThing(copter, copt_Target1, 0);
  999.  
  1000.     # fade the shadow out
  1001.     ThingFadeAnim(chop_shadow, 1.0, 0.0, 3.0, 0);
  1002.  
  1003.     # Create a ring blast under the chopper
  1004.     smoke = CreateThing(smokeTpl, dust_pivot);
  1005.     AnimateSpriteSize(smoke, '0.1 0.1 1.0', '2.0 2.0 0.0', 0.75);
  1006.     SetCameraFOV(75, 1, 1.7);
  1007.     Sleep(1.0);
  1008.  
  1009.     # send message to soundfade out cog to clear sector sounds 
  1010.     SendMessage(sectorcog, user3);
  1011.     SendMessage(ambcog, user3);
  1012.  
  1013.     # Stop dust particles
  1014.     SetPulse(0);
  1015.     AISetMoveSpeed(copter, 1.1);
  1016.     Sleep(0.7);
  1017.  
  1018.     AISetMoveSpeed(copter, 1.2);
  1019.     AISetLookThing(sophia, copt_Target2);
  1020.     AISetLookThing(indy, copt_Target2);
  1021.     AISetLookThing(copter, copt_Target2);
  1022.     AISetMoveThing(copter, copt_Target2, 0);
  1023.     Sleep(0.8);
  1024.     
  1025.     AISetMoveSpeed(copter, 1.3);
  1026.     AISetLookThing(sophia, copt_Target3);
  1027.     AISetLookThing(indy, copt_Target3);
  1028.     AISetLookThing(copter, copt_Target3);
  1029.     AISetMoveThing(copter, copt_Target3, 0);
  1030.     Sleep(1.3);
  1031.  
  1032.     AISetMoveSpeed(copter, 1.2);
  1033.     AISetLookThing(sophia, copt_Target4);
  1034.     AISetLookThing(indy, copt_Target4);
  1035.     AISetLookThing(copter, copt_Target4);
  1036.     AISetMoveThing(copter, copt_Target4, 0);
  1037.     Sleep(0.5);
  1038.  
  1039.     AISetMoveSpeed(copter, 1.1);
  1040.     AISetLookThing(sophia, copt_Target5);
  1041.     AISetLookThing(indy, copt_Target5);
  1042.     AISetLookThing(copter, copt_Target5);
  1043.     AISetMoveThing(copter, copt_Target5, 0);
  1044.     SetCameraFOV(90, 1, 9.0);
  1045.     Sleep(3.0);
  1046.     AISetMoveSpeed(copter, 1.0);
  1047.     Sleep(5.0);
  1048.  
  1049.     SetCollideType(indy, in_colltype);
  1050.     SetCollideType(sophia, so_colltype);
  1051.     SetCollideType(copter, co_colltype);
  1052.  
  1053.     # Fade out...
  1054.     ClearThingFlags(fadeoutplate, 0x80000);
  1055.     ThingFadeAnim(fadeoutplate, 0.0, 1.0, 1.0, 0);
  1056.     
  1057.     Sleep(1.0);
  1058.     
  1059.     EndCutscene();
  1060.     
  1061.     #### test only #### Clean up...
  1062.     ## ClearActorFlags(player, 0x200000); 
  1063.     ## SetCurrentCamera(curCam);
  1064.     ## ResetCameraFOV(0, 0.0);
  1065.  
  1066.     SetThingMaxRotVel(indy, in_rotRate); 
  1067.     SetThingMaxRotVel(sophia, so_rotRate); 
  1068.     SetThingMaxRotVel(copter, cop_rotRate);
  1069.  
  1070.     # Put Sophia's heads back!
  1071.     SetThingVoiceHeads(sophia, "sohead", "head_so_msound.3do", "head_so_asound.3do", "head_so_amsound.3do", "head_so_osound.3do");
  1072.  
  1073.     JonesEndLevel();
  1074.  
  1075.     return;
  1076.  
  1077. # -------------------------------------------------------------------
  1078.  
  1079. callback:
  1080.  
  1081.     sender = GetSenderRef();
  1082.     callNum = GetParam(1);
  1083.  
  1084.     if (sender == indy)
  1085.     {
  1086.         if (callNum == 21)
  1087.         {
  1088.             meshRefHat = SetThingMesh(indy, 8, mod_in_Hair, 0);
  1089.             meshRefHead = SetThingMesh(indy, 9, mod_in_Hair, 1);
  1090.             meshRefHand = SetThingMesh(indy, 15, mod_in_HandHat, 0);
  1091.  
  1092.             # RT: Set up no-hat heads...
  1093.             SetThingVoiceHeads(indy, "inhead", "head_in_goodhair.3do", "head_in_asound_gh.3do", "head_in_amsound_gh.3do", "head_in_osound_gh.3do");
  1094.         }
  1095.         else if (callNum == 22)
  1096.         {
  1097.             RestoreThingMesh(indy, meshRefHat);
  1098.             RestoreThingMesh(indy, meshRefHead);
  1099.             RestoreThingMesh(indy, meshRefHand);
  1100.             
  1101.             # RT: Restore default heads...
  1102.             SetThingVoiceHeads(indy, "inhead", "", "head_in_asound.3do", "head_in_amsound.3do", "head_in_osound.3do");
  1103.         }
  1104.         else if (callNum == 23)
  1105.         {
  1106.             meshRefHand = SetThingMesh(indy, 15, mod_in_HandGear, 0);
  1107.         }
  1108.         else if (callNum == 24)
  1109.         {
  1110.             matAnimNum = MaterialAnim(gearMat, 8.0, 0x1);
  1111.         }
  1112.         else if (callNum == 25)
  1113.         {
  1114.             meshRefHand = SetThingMesh(indy, 15, mod_in_HandPhoto, 0);
  1115.             SetThingFlags(photoV2, 0x80000);
  1116.         }
  1117.         else if (callNum == 26)
  1118.         {
  1119.             RestoreThingMesh(indy, meshRefHand);
  1120.             ClearThingFlags(photoV2, 0x80000);
  1121.         }
  1122.     }
  1123.     else if (sender == sophia)
  1124.     {
  1125.         if (callNum == 16) # Remove swap anims are tagged with #16
  1126.         {
  1127.             RestoreThingMesh(sophia, -99); # -99 Restores ALL meshes
  1128.         }
  1129.         else if (callNum == 21)
  1130.         {
  1131.             # Swap out Sophia's goggle head
  1132.             RestoreThingMesh(sophia, -99); # -99 Restores ALL meshes
  1133.             # Swap in her hand with the helmet
  1134.             SetThingMesh(sophia, 18, mod_so_HandHelmet, 0);
  1135.         }
  1136.         else if (callNum == 22)
  1137.         {
  1138.             SetThingMesh(sophia, 18, mod_so_HandShard, 0);
  1139.         }
  1140.         else if (callNum == 23 && so_swap == 1)
  1141.         {
  1142.             SetThingMesh(sophia, 15, mod_so_HandGear, 0);
  1143.             so_swap = 0;
  1144.         }
  1145.         else if (callNum == 24)
  1146.         {
  1147.             # Get rid of her helmet hand...
  1148.             RestoreThingMesh(sophia, so_meshRefHand);
  1149.  
  1150.             # Swap in her goggle head...
  1151.             call goggleHead;
  1152.  
  1153.             # New set of heads...
  1154.             SetThingVoiceHeads(sophia, "sohead", "head_so_helmet.3do", "head_so_helmet_asound.3do", "head_so_helmet_amsound.3do", "head_so_helmet_osound.3do");
  1155.         }
  1156.     }
  1157.     else if (sender == so_arm)
  1158.     {
  1159.         RestoreThingMesh(so_arm, -99); # -99 Restores ALL meshes
  1160.         
  1161.         if (so_arm_swap == 1)
  1162.         {
  1163.             ClearThingFlags(photoBab, 0x80000);
  1164.         }
  1165.         else if (so_arm_swap == 2)
  1166.         {
  1167.             ClearThingFlags(photoVo, 0x80000);
  1168.         }
  1169.         else if (so_arm_swap == 3)
  1170.         {
  1171.             ClearThingFlags(photoV2, 0x80000);
  1172.         }
  1173.     }
  1174.  
  1175.     return;
  1176.  
  1177. # -------------------------------------------------------------------
  1178.  
  1179. pulse:
  1180.  
  1181.     CreateThing(chopdust, dust_pivot);
  1182.     return;
  1183.  
  1184. # -------------------------------------------------------------------
  1185.  
  1186. goggleHead:
  1187.  
  1188.     SetThingMesh(sophia, 2, mod_so_Helmet, 0);
  1189.     SetThingMesh(sophia, 3, mod_so_Helmet, 1);
  1190.     SetThingMesh(sophia, 4, mod_so_Helmet, 2);
  1191.     SetThingMesh(sophia, 5, mod_so_Helmet, 3);
  1192.     SetThingMesh(sophia, 6, mod_so_Helmet, 4);
  1193.     SetThingMesh(sophia, 7, mod_so_Helmet, 5);
  1194.     SetThingMesh(sophia, 8, mod_so_Helmet, 6);
  1195.     SetThingMesh(sophia, 9,  mod_so_Helmet, 7);
  1196.     SetThingMesh(sophia, 10, mod_so_Helmet, 8);
  1197.  
  1198.     return;
  1199.  
  1200. # -------------------------------------------------------------------
  1201. timer:
  1202.  
  1203. If (GetSenderID() == 1)
  1204.     {
  1205.         chopSound1 = PlaySoundLocal(heliRev1, 0, 0, 0x11, 0);
  1206.         ChangeSoundVol(chopSound1, 1, 2.879);
  1207.     }
  1208.  
  1209. If (GetSenderID() == 2)
  1210.     {
  1211.         ChangeSoundVol(chopSound1, 0, 7.894);
  1212.     }
  1213.  
  1214. If (GetSenderID() == 3)
  1215.     {
  1216.         chopSound2 = PlaySoundLocal(heliRev2, 0, 0, 0x1, 0);
  1217.         ChangeSoundVol(chopSound2, 1, 1.279);
  1218.     }
  1219.  
  1220. If (GetSenderID() == 4)
  1221.     {
  1222.         # Fade copter sound
  1223.         ChangeSoundVol(chopSound2, 0, 6);
  1224.     }
  1225. return;
  1226.  
  1227. # -------------------------------------------------------------------
  1228.     
  1229. end
  1230.